package io.wit.modules.wit.service.impl;

import io.wit.modules.wit.dao.CashierDao;
import io.wit.modules.wit.entity.CashierEntity;
import io.wit.modules.wit.service.CashierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;



@Service("cashierService")
public class CashierServiceImpl implements CashierService {
	@Autowired
	private CashierDao cashierDao;
	
	@Override
	public CashierEntity queryObject(Long dataId){
		return cashierDao.queryObject(dataId);
	}
	
	@Override
	public List<CashierEntity> queryList(Map<String, Object> map){
		return cashierDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return cashierDao.queryTotal(map);
	}
	
	@Override
	public void save(CashierEntity cashier){
		cashier.setCreateTime(new Date());
		cashierDao.save(cashier);
	}
	
	@Override
	public void update(CashierEntity cashier){
		cashierDao.update(cashier);
	}
	
	@Override
	public void delete(Long dataId){
		cashierDao.delete(dataId);
	}
	
	@Override
	public void deleteBatch(Long[] dataIds){
		cashierDao.deleteBatch(dataIds);
	}
	
}
